package com.drcoffee.drcoffeemall.mapper;

import com.drcoffee.drcoffeemall.entry.WxBill;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface WxBillMapper {

    @Insert("insert into t_wx(odd,BCharges) values(#{odd},#{BCharges})")
    void insertW(WxBill wxBill);

    @Select("SELECT t_wx.BCharges FROM t_wx WHERE odd like #{odd}")
    String selectW(String odd);

    @Select("select trade_no from t_trade")
    List<String> getAll();

    @Update("update t_trade set trade_BCharges = #{trade_BCharges} where trade_no = #{trade_no}")
    void updateTrade(String trade_no, String trade_BCharges);

}
